<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .card{
            position: relative;
            width: 600px;
            height: 400px;
            margin: 100px auto;
            overflow: hidden;
        }
        .card img{
            width: 100%;
            height: 100%;
            transition: .8s;
        }
        .card .t{
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            font-size: 28px;
            color: #fff;
            font-weight: bolder;
        }
        .card .b{
            position: absolute;
            left: 0;
            top: calc(50% + 40px);
            width: 100%;
            text-align: center;
            font-size: 16px;
            color: #fff;
            
            font-weight: bolder;
            transform: scale(1.5);
            opacity: 0;
            transition: all ease .8s;
        }
        .card:hover{
            /* 黑白效果 */
            filter: grayscale(100%);
        }
        .card:hover img{
            transform: scale(1.5);
        }
        .card:hover .b{
            transform: scale(1);
            opacity: 1;
        }
    </style>
</head>
<body>
    <div class="card">
        <img src="4.jpg" alt="">
        <p class="t">Postcards From Italy</p>
        <p class="b">And I will love to see that day</p>
    </div>
</body>
</html>